package com.htc.android.footprints.vo;

import java.io.File;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.android.maps.GeoPoint;
import com.htc.android.footprints.utils.voice.FootprintVoiceManager;

public class Footprint implements Parcelable {
	public static final Parcelable.Creator<Footprint> CREATOR = new Parcelable.Creator() {
		public Footprint createFromParcel(Parcel paramParcel) {
			return new Footprint(paramParcel);
		}

		public Footprint[] newArray(int paramInt) {
			return new Footprint[paramInt];
		}
	};
	public static final int LOCATION_SOURCE_GPS = 2;
	public static final int LOCATION_SOURCE_MAP = 3;
	public static final int LOCATION_SOURCE_NETWORK = 1;
	public static final int LOCATION_SOURCE_NO;
	public int mAccuracy;
	public String mAddr;
	public String mAudioFileName;
	public String mAudioPath;
	public String mCategory;
	public String mComment;
	public long mCreateTime;
	public long mDrewableID;
	private int mID = -1;
	public int mLatitude;
	public int mLongitude;
	public String mName;
	public String mPicFileName;
	public String mPicPath;
	public int mRate;
	public String mShortDate;
	public String mSite;
	public String mTel;
	public int mVersion;
	public float mVoiceSampleLength = 0.0F;

	public Footprint() {
		this.mRate = 3;
		this.mCategory = "favorite";
	}

	private Footprint(Parcel paramParcel) {
		this.mID = paramParcel.readInt();
		this.mName = paramParcel.readString();
		this.mTel = paramParcel.readString();
		this.mAddr = paramParcel.readString();
		this.mComment = paramParcel.readString();
		this.mCategory = paramParcel.readString();
		this.mCreateTime = paramParcel.readLong();
		this.mLatitude = paramParcel.readInt();
		this.mLongitude = paramParcel.readInt();
		this.mSite = paramParcel.readString();
		this.mRate = paramParcel.readInt();
		this.mDrewableID = paramParcel.readLong();
		this.mVersion = paramParcel.readInt();
		this.mAudioPath = paramParcel.readString();
		this.mPicPath = paramParcel.readString();
		this.mRate = paramParcel.readInt();
		this.mPicFileName = paramParcel.readString();
		this.mAudioFileName = paramParcel.readString();
		this.mVoiceSampleLength = paramParcel.readFloat();
		this.mAccuracy = paramParcel.readInt();
		this.mShortDate = paramParcel.readString();
	}

	public void copyFrom(Footprint paramFootprint) {
		this.mName = paramFootprint.mName;
		this.mTel = paramFootprint.mTel;
		this.mAddr = paramFootprint.mAddr;
		this.mComment = paramFootprint.mComment;
		this.mCategory = paramFootprint.mCategory;
		this.mCreateTime = paramFootprint.mCreateTime;
		this.mLatitude = paramFootprint.mLatitude;
		this.mLongitude = paramFootprint.mLongitude;
		this.mSite = paramFootprint.mSite;
		this.mRate = paramFootprint.mRate;
		this.mDrewableID = paramFootprint.mDrewableID;
		this.mVersion = paramFootprint.mVersion;
		this.mAudioPath = paramFootprint.mAudioPath;
		this.mPicPath = paramFootprint.mPicPath;
		this.mAccuracy = paramFootprint.mAccuracy;
		this.mPicFileName = paramFootprint.mPicFileName;
		this.mAudioFileName = paramFootprint.mAudioFileName;
		this.mVoiceSampleLength = paramFootprint.mVoiceSampleLength;
		this.mShortDate = paramFootprint.mShortDate;
	}

	public int describeContents() {
		return 0;
	}

	public boolean equals(Object paramObject) {
		if (this.mID == ((Footprint) paramObject).getID())
			;
		for (int i = 1;; i = 0)
			return i;
	}

	public int getID() {
		return this.mID;
	}

	public int getLocationSource() {
		int i;
		switch (this.mAccuracy) {
		default:
			i = 0;
		case 0:
		case 1:
		case 2:
		case 3:
		}
		while (true) {
			return i;
			i = 0;
			continue;
			i = 1;
			continue;
			i = 2;
			continue;
			i = 3;
		}
	}

	public GeoPoint getPoint() {
		return new GeoPoint(this.mLatitude, this.mLongitude);
	}

	public void setAccuracyByProvider(String paramString) {
		if (paramString.equals("network"))
			this.mAccuracy = 1;
		while (true) {
			return;
			if (paramString.equals("gps")) {
				this.mAccuracy = 2;
				continue;
			}
			if (paramString.equals("map")) {
				this.mAccuracy = 3;
				continue;
			}
			this.mAccuracy = 0;
		}
	}

	public void setAudio(String paramString) {
		if ((paramString == null) || (paramString.equals("")))
			this.mAudioFileName = "";
		for (this.mAudioPath = "";; this.mAudioPath = (FootprintVoiceManager
				.getDirectory() + File.separator + paramString)) {
			return;
			this.mAudioFileName = paramString;
		}
	}

	public void setID(int paramInt) {
		this.mID = paramInt;
	}

	public void setPic(String paramString) {
		if ((paramString == null) || (paramString.equals(""))) {
			this.mPicFileName = "";
			this.mPicPath = "";
		}
		while (true) {
			return;
			this.mPicPath = paramString;
			this.mPicFileName = new File(paramString).getName();
		}
	}

	public void writeToParcel(Parcel paramParcel, int paramInt) {
		paramParcel.writeInt(this.mID);
		paramParcel.writeString(this.mName);
		paramParcel.writeString(this.mTel);
		paramParcel.writeString(this.mAddr);
		paramParcel.writeString(this.mComment);
		paramParcel.writeString(this.mCategory);
		paramParcel.writeLong(this.mCreateTime);
		paramParcel.writeInt(this.mLatitude);
		paramParcel.writeInt(this.mLongitude);
		paramParcel.writeString(this.mSite);
		paramParcel.writeInt(this.mRate);
		paramParcel.writeLong(this.mDrewableID);
		paramParcel.writeInt(this.mVersion);
		paramParcel.writeString(this.mAudioPath);
		paramParcel.writeString(this.mPicPath);
		paramParcel.writeInt(this.mRate);
		paramParcel.writeString(this.mPicFileName);
		paramParcel.writeString(this.mAudioFileName);
		paramParcel.writeFloat(this.mVoiceSampleLength);
		paramParcel.writeInt(this.mAccuracy);
		if (this.mShortDate == null)
			this.mShortDate = "";
		paramParcel.writeString(this.mShortDate);
	}
}

/*
 * Location:
 * E:\workspace\dex2java\dex-translator-0.0.9.3\HtcFootprints_dex2jar.jar
 * Qualified Name: com.htc.android.footprints.vo.Footprint JD-Core Version:
 * 0.6.0
 */